﻿@model IEnumerable<HelloMinasan.Domain.Song>

@{
    ViewBag.Title = "Search";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1 class="titleNewFont" style="padding-left:48px"><img src="~/Content/Images/xmag.png" />Search result(s)</h1>
<table cellspacing="0" class="tableSearch" style="width:99%">
    <thead>
        <th width="48"></th>
        <th>Song Name</th>
        <th>Owner</th>
        <th>Lyric</th>
        <th>Test Count</th>
    </thead>
    <tbody>
        @if(Model.Any()){
            foreach (var item in Model)
            {
                <tr>
                    <td><img src="~/Content/Images/song.png" /></td>
                    <td><a class="titleNewFont fontsize20px fontbold" style="color:#257cba" href="/Song/Songs/@item.SongId">@item.SongName</a></td>
                    <td><a href="/Account/UserInformation/@item.User.Username">@item.User.Username</a></td>
                    <td>@item.LyricDetails.Count language(s)</td>
                    <td>
                        @item.QuestionBlanks.Count blank test(s)
                        <br />
                        @item.QuestionQuizs.Count quiz test(s)
                    </td>
                </tr>
            }
        }
        else
        {
            <tr>
                <td colspan="5">There is no result with keyword @ViewBag.Keyword</td>
            </tr>
        }
    </tbody>
</table>
